
Ext.define('pf.NavigationPanel', {
    cls: 'navigation-panel',
	extend: 'Ext.container.Container',
	events: ['switchcard'],
	layout: {
		type: 'hbox',
		align: 'stretch'
	},
	defaults: {
	    toggleGroup: 'nav-buttons',
	    allowDepress: false,
	    pressed: false,
	    flex: 1,
		handler: function(btn) {
		    if (btn.cardID === 'dashboard') {
		        pf.util.MessageBus.fireEvent('switchview', btn.cardID);
		    }
		    else {
    			pf.util.MessageBus.addEvents('switchcard');
    			pf.util.MessageBus.fireEvent('switchcard', btn.cardID);
		    }
		}
	},
	items: [{
	    pressed: true,
		xtype: 'button',
		text: 'About Me',
		cardID: 'about'
	}, {
		xtype: 'button',
		text: 'Resume',
		cardID: 'resume'
	}, {
		xtype: 'button',
		text: 'Projects',
		cardID: 'projects'
	}, {
	    flex: 2,
        xtype: 'button',
        text: 'Manpreet Kohli',
        cardID: 'dashboard'
    }, {
	    xtype: 'button',
	    text: 'Coursework',
	    cardID: 'coursework'
	}, {
		xtype: 'button',
		text: 'Bookshelf',
		cardID: 'bookshelf'
	}, {
		xtype: 'button',
		text: 'Contact',
		cardID: 'contact'
	}]
});